<!-- $Id: bonus_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="POST" action="advance.php?act=batch" name="listForm">
<!-- start user_bonus list -->
<div class="list-div" id="listDiv">
{/if}

  <table cellpadding="3" cellspacing="1">
    <tr>
      <th>
        <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">
        <a href="javascript:listTable.sort('advance_id'); ">{$lang.record_id}</a>{$sort_advance_id}</th>
      <th><a href="javascript:listTable.sort('goods_id'); ">商品编号</a>{$sort_goods_id}</th>  
      <th><a href="javascript:listTable.sort('order_id'); ">订单号</a>{$sort_order_id}</th>
      <th><a href="javascript:listTable.sort('user_id'); ">使用会员</a>{$sort_user_id}</th>
      <th><a href="javascript:listTable.sort('create_time'); ">创建时间</a>{$sort_create_time}</th>
      <th><a href="javascript:listTable.sort('used_time'); ">使用时间</a>{$sort_used_time}</th>
      <th><a href="javascript:listTable.sort('advance_price'); ">优惠折扣</a>{$sort_advance_price}</th>
      <!-- <th><a href="javascript:listTable.sort('emailed'); ">邮件通知</a>{$sort_emailed}</th> -->
      <th><a href="javascript:listTable.sort('sms'); ">短信通知</a>{$sort_sms}</th>
      <th>{$lang.handler}</th>
    </tr>
    {foreach from=$advance_list item=advance}
    <tr>
      <td><span><input value="{$advance.advance_id}" name="checkboxes[]" type="checkbox">{$advance.advance_id}</span></td>
      <td align="center">{$advance.goods_id}</td>
      <td>{$advance.order_sn}</td>
      <td>{if $advance.email}<a href="mailto:{$bonus.email}">{$advance.user_name}</a>{else}{$advance.user_name}{/if}</td>
      <td align="right">{$advance.create_time}</td>
      <td align="right">{$advance.used_time}</td>
      <td align="center">{$advance.advance_price}%</td>
      <!-- <td align="center">{$advance.emailed}</td> -->
      <td align="center">{$advance.sms}</td>
      <td align="center">
        <a href="javascript:;" onclick="listTable.remove({$advance.advance_id}, '{$lang.drop_confirm}', 'remove')">{$lang.remove}</a>
        <!-- <a href="advance.php?act=send_mail&advance_id={$advance.advance_id}">{$lang.send_mail}</a> -->
      </td>
    </tr>
    {foreachelse}
    <tr><td class="no-records" colspan="11">{$lang.no_records}</td></tr>
    {/foreach}
  </table>

  <table cellpadding="4" cellspacing="0">
    <tr>
      <td>
      	<input type="submit" name="drop" id="btnSubmit" value="{$lang.drop}" class="button" disabled="true" />
      	<!-- <input type="submit" name="mail" id="btnSubmit1" value="{$lang.send_mail}" class="button" disabled="true" /> -->
      </td>
      <td align="right">{include file="page.htm"}</td>
    </tr>
  </table>

{if $full_page}
</div>
<!-- end user_bonus list -->
</form>

<script type="text/javascript" language="JavaScript">
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};
  listTable.query = "query";

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
    document.forms['listForm'].reset();
  }
  {/literal}
</script>
{include file="pagefooter.htm"}
{/if}